#ifndef _SERVER_H_INCLUDED_
#define _SERVER_H_INCLUDED_

#include "socketlibtypes.h"

#ifdef  __cplusplus
extern "C" {
#endif

struct server_s;

void server_poll(struct server_s* self);
void server_socket_add(struct server_s* self, sock fd);
void server_socket_close(struct server_s* self, int index);
int server_socket_send(struct server_s* self, int index, const char* data, int len);
void server_setext(struct server_s* self, void* ext);
void* server_getext(struct server_s* self);

#ifdef  __cplusplus
}
#endif

#endif
